/*
 * To change this license header, choose License Headers in Project Properties.
 * To change this template file, choose Tools | Templates
 * and open the template in the editor.
 */
package com.common.json;

import org.json.simple.JSONArray;
import org.json.simple.parser.JSONParser;
import org.json.simple.parser.ParseException;

/**
 *
 * @author _HungChilvas_
 */
public class ParseJSONObject {

    public JSONArray parseJSON(String jsonString) {
        try {
            // 1. Tạo ra một JSONParser
            JSONParser jsonParser = new JSONParser();
            // 2. Parser chuỗi JSON về một JSONObject
            JSONArray jsonArr = (JSONArray) jsonParser.parse(jsonString);
            return jsonArr;
        } catch (ParseException e) {
            e.printStackTrace();
        }
        return null;
    }
}
